package com.devilvan.betrice.advice;

import com.devilvan.betrice.dto.BetriceSnapDto;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * @author Evad.Wu
 * @Description 屏幕截图 通知组件
 * @date 2022-09-15
 */
@Slf4j
@Aspect
@Component
public class BetriceSnapAdvice {
    @After(value = "execution(public void com.devilvan.betrice.component.BetriceSnapComponenet.snapScreen(*))")
    protected void after(JoinPoint joinPoint) {
        BetriceSnapDto betriceSnapDto = (BetriceSnapDto) joinPoint.getArgs()[0];
        log.info("截图成功，图片导出路径：" + betriceSnapDto.getExportPath());
    }
}
